Picks the spot on the screen that stays still while the room’s zoomable background zooms and turns. It starts as the middle of the screen.
Game Boy: not available
Game Boy Color: not available
Sega Genesis: not available
On other consoles this differs: see Side by side and How the consoles differ.
zoom_background_focus(x, y)| Name | Type |
|---|---|
x | real |
y | real |
Nothing.
Picks the spot on the screen that stays still while the room's zoomable background zooms and turns. It starts as the middle of the screen. It does nothing in a room that has no zoomable background.
Think of pinning a map to a table with one finger. You can pin it in the middle, or somewhere else, and then pull it bigger or twist it. Whatever is under your finger does not move. This call says where your finger is.
Put the focus over whatever the player is looking at, a cursor on a map for example, and zooming in grows the picture out from underneath the cursor, instead of from the middle of the screen.
x and y are screen numbers: (0, 0) is the top-left pixel of the screen. The focus is held to a whole pixel, because that is the finest the hardware can place it. The picture itself still moves in smaller steps through zoom_background_position.
// Step event of a map cursor. Its own x and y are where the cursor is on the screen.
zoom_background_focus(x, y);
zoom_background_scale(2);The map is drawn twice as big, and it grows out from underneath the cursor: the place the cursor points at stays under it.
A no-op in a room that has no zoomable background. Put the spot over whatever the player is looking at - a map’s cursor, say - and zooming in grows the picture out from underneath it instead of from the middle of the screen. A SCREEN position, counted from the screen’s top-left pixel. The focus is held to a whole pixel (the hardware cannot do less); the picture itself still moves in smaller steps through zoom_background_position.